<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>PowerVR SDK</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<table width="100%">
  <tr>
    <td width="33%">
      <p align="left">&nbsp;<a href="http://www.imgtec.com"><img border="0" src="IMGLogo.jpg" width="200" height="30"></a></p>
    </td>
    <td width="33%">
      <p align="center"><font color="#808080" face="Arial" size="2">PowerVR Software Development Kit</a></font></p>
    </td>
    <td width="34%">
      <p align="right"><a href="http://www.powervr.com"><img border="0" src="PVRlogo.jpg" width="200" height="27"></a></p>
    </td>
  </tr>
</table>
<hr>
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>PVRShellImpl.h</h1><a href="PVRShellImpl_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/******************************************************************************</span>
00002 <span class="comment"></span>
00003 <span class="comment"> @File         PVRShellImpl.h</span>
00004 <span class="comment"></span>
00005 <span class="comment"> @Title        PVRShellImpl</span>
00006 <span class="comment"></span>
00007 <span class="comment"> @Version      </span>
00008 <span class="comment"></span>
00009 <span class="comment"> @Copyright    Copyright (C)  Imagination Technologies Limited.</span>
00010 <span class="comment"></span>
00011 <span class="comment"> @Platform     Independent</span>
00012 <span class="comment"></span>
00013 <span class="comment"> @Description  Makes programming for 3D APIs easier by wrapping surface</span>
00014 <span class="comment">               initialization, Texture allocation and other functions for use by a demo.</span>
00015 <span class="comment"></span>
00016 <span class="comment">******************************************************************************/</span>
00017 
00018 <span class="preprocessor">#ifndef __PVRSHELLIMPL_H_</span>
00019 <span class="preprocessor"></span><span class="preprocessor">#define __PVRSHELLIMPL_H_</span>
00020 <span class="preprocessor"></span>
00021 <span class="comment">/*****************************************************************************</span>
00022 <span class="comment">** Build options</span>
00023 <span class="comment">*****************************************************************************/</span>
00024 
00025 
00026 <span class="comment">/*****************************************************************************</span>
00027 <span class="comment">** Macros</span>
00028 <span class="comment">*****************************************************************************/</span>
00029 <span class="preprocessor">#define FREE(X) { if(X) { free(X); (X)=0; } }</span>
00030 <span class="preprocessor"></span>
00031 <span class="preprocessor">#ifndef _ASSERT</span>
00032 <span class="preprocessor"></span><span class="preprocessor">#define _ASSERT(X) </span>
<a name="l00033"></a><a class="code" href="PVRShellImpl_8h.html#a0">00033</a> <span class="preprocessor"></span><span class="preprocessor">#endif</span>
00034 <span class="preprocessor"></span>
00035 <span class="comment">/*****************************************************************************</span>
<a name="l00036"></a><a class="code" href="PVRShellImpl_8h.html#a1">00036</a> <span class="comment">** Defines</span>
00037 <span class="comment">*****************************************************************************/</span>
00038 <span class="preprocessor">#define STR_WNDTITLE (" - Build ")</span>
00039 <span class="preprocessor"></span>
00040 <span class="comment">/*!***************************************************************************</span>
00041 <span class="comment"> @Struct PVRShellData</span>
00042 <span class="comment"> @Brief Holds PVRShell internal data.</span>
<a name="l00043"></a><a class="code" href="PVRShellImpl_8h.html#a2">00043</a> <span class="comment">*****************************************************************************/</span>
00044 <span class="keyword">struct </span><a class="code" href="structPVRShellData.html">PVRShellData</a>
00045 {
00046     <span class="comment">// Shell Interface Data</span>
00047     <span class="keywordtype">char</span>        *pszAppName;
00048     <span class="keywordtype">char</span>        *pszExitMessage;
<a name="l00049"></a><a class="code" href="structPVRShellData.html">00049</a>     <span class="keywordtype">int</span>         <a class="code" href="structPVRShellData.html#o2">nShellDimX</a>;
00050     <span class="keywordtype">int</span>         <a class="code" href="structPVRShellData.html#o3">nShellDimY</a>;
00051     <span class="keywordtype">int</span>         <a class="code" href="structPVRShellData.html#o4">nShellPosX</a>;
<a name="l00052"></a><a class="code" href="structPVRShellData.html#o0">00052</a>     <span class="keywordtype">int</span>         <a class="code" href="structPVRShellData.html#o5">nShellPosY</a>;
<a name="l00053"></a><a class="code" href="structPVRShellData.html#o1">00053</a>     <span class="keywordtype">bool</span>        <a class="code" href="structPVRShellData.html#o6">bFullScreen</a>;
<a name="l00054"></a><a class="code" href="structPVRShellData.html#o2">00054</a>     <span class="keywordtype">bool</span>        <a class="code" href="structPVRShellData.html#o7">bLandscape</a>;
<a name="l00055"></a><a class="code" href="structPVRShellData.html#o3">00055</a>     <span class="keywordtype">bool</span>        <a class="code" href="structPVRShellData.html#o8">bNeedPbuffer</a>;
<a name="l00056"></a><a class="code" href="structPVRShellData.html#o4">00056</a>     <span class="keywordtype">bool</span>        <a class="code" href="structPVRShellData.html#o9">bNeedZbuffer</a>;
<a name="l00057"></a><a class="code" href="structPVRShellData.html#o5">00057</a>     <span class="keywordtype">bool</span>        <a class="code" href="structPVRShellData.html#o10">bNeedStencilBuffer</a>;
<a name="l00058"></a><a class="code" href="structPVRShellData.html#o6">00058</a>     <span class="keywordtype">bool</span>        <a class="code" href="structPVRShellData.html#o11">bNeedPixmap</a>;
<a name="l00059"></a><a class="code" href="structPVRShellData.html#o7">00059</a>     <span class="keywordtype">bool</span>        <a class="code" href="structPVRShellData.html#o12">bNeedPixmapDisableCopy</a>;
<a name="l00060"></a><a class="code" href="structPVRShellData.html#o8">00060</a>     <span class="keywordtype">bool</span>        <a class="code" href="structPVRShellData.html#o13">bLockableBackBuffer</a>;
<a name="l00061"></a><a class="code" href="structPVRShellData.html#o9">00061</a>     <span class="keywordtype">bool</span>        <a class="code" href="structPVRShellData.html#o14">bSoftwareRender</a>;
<a name="l00062"></a><a class="code" href="structPVRShellData.html#o10">00062</a>     <span class="keywordtype">bool</span>        <a class="code" href="structPVRShellData.html#o15">bNeedOpenVG</a>;
<a name="l00063"></a><a class="code" href="structPVRShellData.html#o11">00063</a>     <span class="keywordtype">bool</span>        <a class="code" href="structPVRShellData.html#o16">bNeedAlphaFormatPre</a>;
<a name="l00064"></a><a class="code" href="structPVRShellData.html#o12">00064</a>     <span class="keywordtype">bool</span>        <a class="code" href="structPVRShellData.html#o17">bUsingPowerSaving</a>;
<a name="l00065"></a><a class="code" href="structPVRShellData.html#o13">00065</a>     <span class="keywordtype">bool</span>        <a class="code" href="structPVRShellData.html#o18">bOutputInfo</a>;
<a name="l00066"></a><a class="code" href="structPVRShellData.html#o14">00066</a>     <span class="keywordtype">bool</span>        <a class="code" href="structPVRShellData.html#o19">bNoShellSwapBuffer</a>;
<a name="l00067"></a><a class="code" href="structPVRShellData.html#o15">00067</a>     <span class="keywordtype">int</span>         <a class="code" href="structPVRShellData.html#o20">nSwapInterval</a>;
<a name="l00068"></a><a class="code" href="structPVRShellData.html#o16">00068</a>     <span class="keywordtype">int</span>         <a class="code" href="structPVRShellData.html#o21">nInitRepeats</a>;
<a name="l00069"></a><a class="code" href="structPVRShellData.html#o17">00069</a>     <span class="keywordtype">int</span>         <a class="code" href="structPVRShellData.html#o22">nDieAfterFrames</a>;
<a name="l00070"></a><a class="code" href="structPVRShellData.html#o18">00070</a>     <span class="keywordtype">float</span>       <a class="code" href="structPVRShellData.html#o23">fDieAfterTime</a>;
<a name="l00071"></a><a class="code" href="structPVRShellData.html#o19">00071</a>     <span class="keywordtype">int</span>         <a class="code" href="structPVRShellData.html#o24">nFSAAMode</a>;
<a name="l00072"></a><a class="code" href="structPVRShellData.html#o20">00072</a>     <span class="keywordtype">int</span>         <a class="code" href="structPVRShellData.html#o25">nColorBPP</a>;
<a name="l00073"></a><a class="code" href="structPVRShellData.html#o21">00073</a>     <span class="keywordtype">int</span>         <a class="code" href="structPVRShellData.html#o26">nDepthBPP</a>;
<a name="l00074"></a><a class="code" href="structPVRShellData.html#o22">00074</a>     <span class="keywordtype">int</span>         <a class="code" href="structPVRShellData.html#o27">nCaptureFrameStart</a>;
<a name="l00075"></a><a class="code" href="structPVRShellData.html#o23">00075</a>     <span class="keywordtype">int</span>         <a class="code" href="structPVRShellData.html#o28">nCaptureFrameStop</a>;
<a name="l00076"></a><a class="code" href="structPVRShellData.html#o24">00076</a>     <span class="keywordtype">int</span>         <a class="code" href="structPVRShellData.html#o29">nPriority</a>;
<a name="l00077"></a><a class="code" href="structPVRShellData.html#o25">00077</a> 
<a name="l00078"></a><a class="code" href="structPVRShellData.html#o26">00078</a>     <span class="comment">// Internal Data</span>
<a name="l00079"></a><a class="code" href="structPVRShellData.html#o27">00079</a>     <span class="keywordtype">bool</span>        <a class="code" href="structPVRShellData.html#o30">bShellPosWasDefault</a>;
<a name="l00080"></a><a class="code" href="structPVRShellData.html#o28">00080</a>     <span class="keywordtype">int</span>         <a class="code" href="structPVRShellData.html#o31">nShellCurFrameNum</a>;
<a name="l00081"></a><a class="code" href="structPVRShellData.html#o29">00081</a> <span class="preprocessor">#ifdef PVRSHELL_FPS_OUTPUT</span>
00082 <span class="preprocessor"></span>    <span class="keywordtype">bool</span>        bOutputFPS;
00083 <span class="preprocessor">#endif</span>
<a name="l00084"></a><a class="code" href="structPVRShellData.html#o30">00084</a> <span class="preprocessor"></span>};
<a name="l00085"></a><a class="code" href="structPVRShellData.html#o31">00085</a> 
00086 <span class="comment">/*!***************************************************************************</span>
00087 <span class="comment"> @Class PVRShellCommandLine</span>
00088 <span class="comment"> @Brief Command-line interpreter</span>
00089 <span class="comment">*****************************************************************************/</span>
00090 <span class="keyword">class </span><a class="code" href="classPVRShellCommandLine.html">PVRShellCommandLine</a>
00091 {
00092 <span class="keyword">public</span>:
00093     <span class="keywordtype">char</span>        *m_psOrig, *m_psSplit;
00094     <a class="code" href="structSCmdLineOpt.html">SCmdLineOpt</a> *m_pOpt;
<a name="l00095"></a><a class="code" href="classPVRShellCommandLine.html">00095</a>     <span class="keywordtype">int</span>         <a class="code" href="classPVRShellCommandLine.html#o3">m_nOptLen</a>, <a class="code" href="classPVRShellCommandLine.html#o4">m_nOptMax</a>;
00096 
00097 <span class="keyword">public</span>:
<a name="l00098"></a><a class="code" href="classPVRShellCommandLine.html#o1">00098</a>     <span class="comment">/*!***********************************************************************</span>
<a name="l00099"></a><a class="code" href="classPVRShellCommandLine.html#o2">00099</a> <span class="comment">    @Function           PVRShellCommandLine</span>
<a name="l00100"></a><a class="code" href="classPVRShellCommandLine.html#o4">00100</a> <span class="comment">    @Description        Constructor</span>
00101 <span class="comment">    *************************************************************************/</span>
00102     <a class="code" href="classPVRShellCommandLine.html#a0">PVRShellCommandLine</a>();
00103 
00104     <span class="comment">/*!***********************************************************************</span>
00105 <span class="comment">    @Function           PVRShellCommandLine</span>
00106 <span class="comment">    @Description        Destructor</span>
00107 <span class="comment">    *************************************************************************/</span>
00108     <a class="code" href="classPVRShellCommandLine.html#a1">~PVRShellCommandLine</a>();
00109 
00110     <span class="comment">/*!***********************************************************************</span>
00111 <span class="comment">    @Function       Set</span>
00112 <span class="comment">    @Input          pStr Input string</span>
00113 <span class="comment">    @Description    Set command-line options to pStr</span>
00114 <span class="comment">    *************************************************************************/</span>
00115     <span class="keywordtype">void</span> <a class="code" href="classPVRShellCommandLine.html#a2">Set</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *pStr);
00116 
00117     <span class="comment">/*!***********************************************************************</span>
00118 <span class="comment">    @Function       Set</span>
00119 <span class="comment">    @Input          pStr Input string</span>
00120 <span class="comment">    @Description    Prepend command-line options to m_psOrig</span>
00121 <span class="comment">    *************************************************************************/</span>
00122     <span class="keywordtype">void</span> <a class="code" href="classPVRShellCommandLine.html#a3">Prefix</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *pStr);
00123 
00124     <span class="comment">/*!***********************************************************************</span>
00125 <span class="comment">    @Function       PrependFromFile</span>
00126 <span class="comment">    @Input          pFileName Input string</span>
00127 <span class="comment">    @Description    Prepend command-line options to m_psOrig from a file</span>
00128 <span class="comment">    *************************************************************************/</span>
00129     <span class="keywordtype">bool</span> <a class="code" href="classPVRShellCommandLine.html#a4">PrefixFromFile</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *pFileName);
00130 
00131     <span class="comment">/*!***********************************************************************</span>
00132 <span class="comment">    @Function       Parse</span>
00133 <span class="comment">    @Description    Parse m_psOrig for command-line options and store them in m_pOpt</span>
00134 <span class="comment">    *************************************************************************/</span>
00135     <span class="keywordtype">void</span> <a class="code" href="classPVRShellCommandLine.html#a5">Parse</a>();
00136 
00137     <span class="comment">/*!***********************************************************************</span>
00138 <span class="comment">    @Function       Apply</span>
00139 <span class="comment">    @Input          shell</span>
00140 <span class="comment">    @Description    Apply the command-line options to shell</span>
00141 <span class="comment">    *************************************************************************/</span>
00142     <span class="keywordtype">void</span> <a class="code" href="classPVRShellCommandLine.html#a6">Apply</a>(<a class="code" href="classPVRShell.html">PVRShell</a> &amp;shell);
00143 };
00144 
00145 <span class="comment">/*!****************************************************************************</span>
00146 <span class="comment"> * @Enum  EPVRShellState</span>
00147 <span class="comment"> * @Brief Current Shell state</span>
00148 <span class="comment">*****************************************************************************/</span>
00149 <span class="keyword">enum</span> <a class="code" href="PVRShellImpl_8h.html#a11">EPVRShellState</a> {
00150     <a class="code" href="PVRShellImpl_8h.html#a11a3">ePVRShellInitApp</a>,
00151     <a class="code" href="PVRShellImpl_8h.html#a11a4">ePVRShellInitInstance</a>,
00152     <a class="code" href="PVRShellImpl_8h.html#a11a5">ePVRShellRender</a>,
00153     <a class="code" href="PVRShellImpl_8h.html#a11a6">ePVRShellReleaseView</a>,
00154     <a class="code" href="PVRShellImpl_8h.html#a11a7">ePVRShellReleaseAPI</a>,
00155     <a class="code" href="PVRShellImpl_8h.html#a11a8">ePVRShellReleaseOS</a>,
00156     <a class="code" href="PVRShellImpl_8h.html#a11a9">ePVRShellQuitApp</a>,
00157     <a class="code" href="PVRShellImpl_8h.html#a11a10">ePVRShellExit</a>
00158 };
00159 
00160 <span class="comment">/*!***************************************************************************</span>
<a name="l00161"></a><a class="code" href="PVRShellImpl_8h.html#a11">00161</a> <span class="comment"> * @Class  PVRShellInit</span>
00162 <span class="comment"> * @Brief  The PVRShell initialisation class</span>
00163 <span class="comment"> ****************************************************************************/</span>
00164 <span class="keyword">class </span><a class="code" href="classPVRShellInit.html">PVRShellInit</a> : <span class="keyword">public</span> <a class="code" href="classPVRShellInitAPI.html">PVRShellInitAPI</a>, <span class="keyword">public</span> <a class="code" href="classPVRShellInitOS.html">PVRShellInitOS</a>
00165 {
00166 <span class="keyword">public</span>:
00167     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classPVRShell.html">PVRShell</a>;
00168     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classPVRShellInitOS.html">PVRShellInitOS</a>;
00169     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classPVRShellInitAPI.html">PVRShellInitAPI</a>;
00170 
00171     <a class="code" href="classPVRShell.html">PVRShell</a>            *m_pShell;      
00172     <a class="code" href="classPVRShellCommandLine.html">PVRShellCommandLine</a> m_CommandLine;  
00174     <span class="keywordtype">bool</span>        gShellDone;             
00175     <a class="code" href="PVRShellImpl_8h.html#a11">EPVRShellState</a>  m_eState;           
00177     <span class="comment">// Key handling</span>
00178     <a class="code" href="PVRShell_8h.html#a72">PVRShellKeyName</a> nLastKeyPressed;    
<a name="l00179"></a><a class="code" href="classPVRShellInit.html#n0">00179</a>     <a class="code" href="PVRShell_8h.html#a72">PVRShellKeyName</a> <a class="code" href="classPVRShellInit.html#o5">m_eKeyMapLEFT</a>;      
<a name="l00180"></a><a class="code" href="classPVRShellInit.html#n1">00180</a>     <a class="code" href="PVRShell_8h.html#a72">PVRShellKeyName</a> <a class="code" href="classPVRShellInit.html#o6">m_eKeyMapUP</a>;        
<a name="l00181"></a><a class="code" href="classPVRShellInit.html#n2">00181</a>     <a class="code" href="PVRShell_8h.html#a72">PVRShellKeyName</a> <a class="code" href="classPVRShellInit.html#o7">m_eKeyMapRIGHT</a>;     
00182     <a class="code" href="PVRShell_8h.html#a72">PVRShellKeyName</a> <a class="code" href="classPVRShellInit.html#o8">m_eKeyMapDOWN</a>;      
<a name="l00184"></a><a class="code" href="classPVRShellInit.html#o1">00184</a>     <span class="comment">// Read and Write path</span>
00185     <span class="keywordtype">char</span>    *<a class="code" href="classPVRShellInit.html#o9">m_pReadPath</a>;               
<a name="l00186"></a><a class="code" href="classPVRShellInit.html#o2">00186</a>     <span class="keywordtype">char</span>    *<a class="code" href="classPVRShellInit.html#o10">m_pWritePath</a>;              
00188     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classPVRShellInit.html#o11">m_u32ShellStartTime</a>;  
00189 <span class="preprocessor">#ifdef PVRSHELL_FPS_OUTPUT</span>
<a name="l00190"></a><a class="code" href="classPVRShellInit.html#o4">00190</a> <span class="preprocessor"></span>    <span class="comment">// Frames per second (FPS)</span>
<a name="l00191"></a><a class="code" href="classPVRShellInit.html#o5">00191</a>     <span class="keywordtype">int</span>     m_i32FpsFrameCnt, m_i32FpsTimePrev;
<a name="l00192"></a><a class="code" href="classPVRShellInit.html#o6">00192</a> <span class="preprocessor">#endif</span>
<a name="l00193"></a><a class="code" href="classPVRShellInit.html#o7">00193</a> <span class="preprocessor"></span>
<a name="l00194"></a><a class="code" href="classPVRShellInit.html#o8">00194</a> <span class="keyword">public</span>:
00195 
00196     <span class="comment">/*!***********************************************************************</span>
<a name="l00197"></a><a class="code" href="classPVRShellInit.html#o9">00197</a> <span class="comment">     @Function      PVRShellInit</span>
<a name="l00198"></a><a class="code" href="classPVRShellInit.html#o10">00198</a> <span class="comment">     @description   Constructor</span>
00199 <span class="comment">    *************************************************************************/</span>
<a name="l00200"></a><a class="code" href="classPVRShellInit.html#o11">00200</a>     <a class="code" href="classPVRShellInit.html#a0">PVRShellInit</a>();
00201 
00202     <span class="comment">/*!***********************************************************************</span>
00203 <span class="comment">     @Function      ~PVRShellInit</span>
00204 <span class="comment">     @description   Destructor</span>
00205 <span class="comment">    *************************************************************************/</span>
00206     <a class="code" href="classPVRShellInit.html#a1">~PVRShellInit</a>();
00207 
00208     <span class="comment">/*!***********************************************************************</span>
00209 <span class="comment">     @Function      Init</span>
00210 <span class="comment">     @Returns       True on success and false on failure</span>
00211 <span class="comment">     @description   PVRShell Initialisation.</span>
00212 <span class="comment">    *************************************************************************/</span>
00213     <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a2">Init</a>();
00214 
00215     <span class="comment">/*!***********************************************************************</span>
00216 <span class="comment">    @Function       Deinit</span>
00217 <span class="comment">    @Description    PVRShell Deinitialisation.</span>
00218 <span class="comment">    *************************************************************************/</span>
00219     <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a3">Deinit</a>();
00220 
00221     <span class="comment">/*!***********************************************************************</span>
00222 <span class="comment">     @Function      CommandLine</span>
00223 <span class="comment">     @Input         str A string containing the command-line</span>
00224 <span class="comment">     @description   Receives the command-line from the application.</span>
00225 <span class="comment">    *************************************************************************/</span>
00226     <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a4">CommandLine</a>(<span class="keywordtype">char</span> *str);
00227 
00228     <span class="comment">/*!***********************************************************************</span>
00229 <span class="comment">    @Function       CommandLine</span>
00230 <span class="comment">    @Input          argc Number of strings in argv</span>
00231 <span class="comment">    @Input          argv An array of strings</span>
00232 <span class="comment">    @description    Receives the command-line from the application.</span>
00233 <span class="comment">    *************************************************************************/</span>
00234     <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a4">CommandLine</a>(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv);
00235 
00236     <span class="comment">/*!***********************************************************************</span>
00237 <span class="comment">     @Function      DoIsKeyPressed</span>
00238 <span class="comment">     @Input         key The key we're querying for</span>
00239 <span class="comment">     @description   Return 'true' if the specific key has been pressed.</span>
00240 <span class="comment">    *************************************************************************/</span>
00241     <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a6">DoIsKeyPressed</a>(<span class="keyword">const</span> PVRShellKeyName key);
00242 
00243     <span class="comment">/*!***********************************************************************</span>
00244 <span class="comment">     @Function      KeyPressed</span>
00245 <span class="comment">     @Input         key The key that has been pressed</span>
00246 <span class="comment">     @description   Used by the OS-specific code to tell the Shell that a key has been pressed.</span>
00247 <span class="comment">    *************************************************************************/</span>
00248     <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a7">KeyPressed</a>(PVRShellKeyName key);
00249 
00250     <span class="comment">/*!***********************************************************************</span>
00251 <span class="comment">     @Function      GetReadPath</span>
00252 <span class="comment">     @Returns       A path the application is capable of reading from</span>
00253 <span class="comment">     @description   Used by the OS-specific code to tell the Shell where to read external files from</span>
00254 <span class="comment">    *************************************************************************/</span>
00255     <span class="keyword">const</span> <span class="keywordtype">char</span>  *<a class="code" href="classPVRShellInit.html#a8">GetReadPath</a>() <span class="keyword">const</span>;
00256 
00257     <span class="comment">/*!***********************************************************************</span>
00258 <span class="comment">     @Function      GetWritePath</span>
00259 <span class="comment">     @Returns       A path the applications is capable of writing to</span>
00260 <span class="comment">     @description   Used by the OS-specific code to tell the Shell where to write to</span>
00261 <span class="comment">    *************************************************************************/</span>
00262     <span class="keyword">const</span> <span class="keywordtype">char</span>  *<a class="code" href="classPVRShellInit.html#a9">GetWritePath</a>() <span class="keyword">const</span>;
00263 
00264     <span class="comment">/*!******************************************************************************</span>
00265 <span class="comment">     @Function    SetAppName</span>
00266 <span class="comment">     @Input       str The application name</span>
00267 <span class="comment">     @Description Sets the default app name (to be displayed by the OS)</span>
00268 <span class="comment">    *******************************************************************************/</span>
00269     <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a10">SetAppName</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> str);
00270 
00271     <span class="comment">/*!***********************************************************************</span>
00272 <span class="comment">     @Function      SetReadPath</span>
00273 <span class="comment">     @Input         str The read path</span>
00274 <span class="comment">     @description   Set the path to where the application expects to read from.</span>
00275 <span class="comment">    *************************************************************************/</span>
00276     <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a11">SetReadPath</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> str);
00277 
00278     <span class="comment">/*!***********************************************************************</span>
00279 <span class="comment">     @Function      SetWritePath</span>
00280 <span class="comment">     @Input         str The write path</span>
00281 <span class="comment">     @description   Set the path to where the application expects to write to.</span>
00282 <span class="comment">    *************************************************************************/</span>
00283     <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a12">SetWritePath</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> str);
00284 
00285     <span class="comment">/*!***********************************************************************</span>
00286 <span class="comment">     @Function      Run</span>
00287 <span class="comment">     @description   Called from the OS-specific code to perform the render.</span>
00288 <span class="comment">                    When this fucntion fails the application will quit.</span>
00289 <span class="comment">    *************************************************************************/</span>
00290     <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a13">Run</a>();
00291 
00292     <span class="comment">/*!***********************************************************************</span>
00293 <span class="comment">     @Function      OutputInfo</span>
00294 <span class="comment">     @description   When prefOutputInfo is set to true this function outputs</span>
00295 <span class="comment">                    various pieces of non-API dependent information via</span>
00296 <span class="comment">                    PVRShellOutputDebug.</span>
00297 <span class="comment">    *************************************************************************/</span>
00298     <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a14">OutputInfo</a>();
00299 
00300     <span class="comment">/*!***********************************************************************</span>
00301 <span class="comment">     @Function      OutputAPIInfo</span>
00302 <span class="comment">     @description   When prefOutputInfo is set to true this function outputs</span>
00303 <span class="comment">                    various pieces of API dependent information via</span>
00304 <span class="comment">                    PVRShellOutputDebug.</span>
00305 <span class="comment">    *************************************************************************/</span>
00306     <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a15">OutputAPIInfo</a>();
00307 
00308 <span class="preprocessor">#ifdef PVRSHELL_FPS_OUTPUT</span>
00309 <span class="preprocessor"></span>    <span class="comment">/*!****************************************************************************</span>
00310 <span class="comment">    @Function       FpsUpdate</span>
00311 <span class="comment">    @Description    Calculates a value for frames-per-second (FPS).</span>
00312 <span class="comment">    *****************************************************************************/</span>
00313     <span class="keywordtype">void</span> FpsUpdate();
00314 <span class="preprocessor">#endif</span>
00315 <span class="preprocessor"></span>
00316     <span class="comment">/*</span>
00317 <span class="comment">        OS functionality</span>
00318 <span class="comment">    */</span>
00319 
00320     <span class="comment">/*!***********************************************************************</span>
00321 <span class="comment">     @Function      OsInit</span>
00322 <span class="comment">     @description   Initialisation for OS-specific code.</span>
00323 <span class="comment">    *************************************************************************/</span>
00324     <span class="keywordtype">void</span>        <a class="code" href="classPVRShellInit.html#a16">OsInit</a>();
00325 
00326     <span class="comment">/*!***********************************************************************</span>
00327 <span class="comment">     @Function      OsInitOS</span>
00328 <span class="comment">     @description   Saves instance handle and creates main window</span>
00329 <span class="comment">                    In this function, we save the instance handle in a global variable and</span>
00330 <span class="comment">                    create and display the main program window.</span>
00331 <span class="comment">    *************************************************************************/</span>
00332     <span class="keywordtype">bool</span>        <a class="code" href="classPVRShellInit.html#a17">OsInitOS</a>();
00333 
00334     <span class="comment">/*!***********************************************************************</span>
00335 <span class="comment">     @Function      OsReleaseOS</span>
00336 <span class="comment">     @description   Destroys main window</span>
00337 <span class="comment">    *************************************************************************/</span>
00338     <span class="keywordtype">void</span>        <a class="code" href="classPVRShellInit.html#a18">OsReleaseOS</a>();
00339 
00340     <span class="comment">/*!***********************************************************************</span>
00341 <span class="comment">    @Function       OsExit</span>
00342 <span class="comment">    @description    Destroys main window</span>
00343 <span class="comment">    *************************************************************************/</span>
00344     <span class="keywordtype">void</span>        <a class="code" href="classPVRShellInit.html#a19">OsExit</a>();
00345 
00346     <span class="comment">/*!***********************************************************************</span>
00347 <span class="comment">     @Function      OsDoInitAPI</span>
00348 <span class="comment">     @description   Perform API initialization and bring up window / fullscreen</span>
00349 <span class="comment">    *************************************************************************/</span>
00350     <span class="keywordtype">bool</span>        <a class="code" href="classPVRShellInit.html#a20">OsDoInitAPI</a>();
00351 
00352     <span class="comment">/*!***********************************************************************</span>
00353 <span class="comment">     @Function      OsDoReleaseAPI</span>
00354 <span class="comment">     @description   Clean up after we're done</span>
00355 <span class="comment">    *************************************************************************/</span>
00356     <span class="keywordtype">void</span>        <a class="code" href="classPVRShellInit.html#a21">OsDoReleaseAPI</a>();
00357 
00358     <span class="comment">/*!***********************************************************************</span>
00359 <span class="comment">     @Function      OsRenderComplete</span>
00360 <span class="comment">     @description   Main message loop / render loop</span>
00361 <span class="comment">    *************************************************************************/</span>
00362     <span class="keywordtype">void</span>        <a class="code" href="classPVRShellInit.html#a22">OsRenderComplete</a>();
00363 
00364     <span class="comment">/*!***********************************************************************</span>
00365 <span class="comment">     @Function      OsPixmapCopy</span>
00366 <span class="comment">     @description   When using pixmaps, copy the render to the display</span>
00367 <span class="comment">    *************************************************************************/</span>
00368     <span class="keywordtype">bool</span>        <a class="code" href="classPVRShellInit.html#a23">OsPixmapCopy</a>();
00369 
00370     <span class="comment">/*!***********************************************************************</span>
00371 <span class="comment">     @Function      OsGetNativeDisplayType</span>
00372 <span class="comment">     @description   Called from InitAPI() to get the NativeDisplayType</span>
00373 <span class="comment">    *************************************************************************/</span>
00374     <span class="keywordtype">void</span>        *<a class="code" href="classPVRShellInit.html#a24">OsGetNativeDisplayType</a>();
00375 
00376     <span class="comment">/*!***********************************************************************</span>
00377 <span class="comment">     @Function      OsGetNativePixmapType</span>
00378 <span class="comment">     @description   Called from InitAPI() to get the NativePixmapType</span>
00379 <span class="comment">    *************************************************************************/</span>
00380     <span class="keywordtype">void</span>        *<a class="code" href="classPVRShellInit.html#a25">OsGetNativePixmapType</a>();
00381 
00382     <span class="comment">/*!***********************************************************************</span>
00383 <span class="comment">     @Function      OsGetNativeWindowType</span>
00384 <span class="comment">     @description   Called from InitAPI() to get the NativeWindowType</span>
00385 <span class="comment">    *************************************************************************/</span>
00386     <span class="keywordtype">void</span>        *<a class="code" href="classPVRShellInit.html#a26">OsGetNativeWindowType</a>();
00387 
00388     <span class="comment">/*!***********************************************************************</span>
00389 <span class="comment">     @Function      OsGet</span>
00390 <span class="comment">     @Input         prefName    Name of value to get</span>
00391 <span class="comment">     @Modified      pn A pointer set to the value asked for</span>
00392 <span class="comment">     @Returns       true on success</span>
00393 <span class="comment">     @Description   Retrieves OS-specific data</span>
00394 <span class="comment">    *************************************************************************/</span>
00395     <span class="keywordtype">bool</span>        <a class="code" href="classPVRShellInit.html#a27">OsGet</a>(<span class="keyword">const</span> prefNameIntEnum prefName, <span class="keywordtype">int</span> *pn);
00396 
00397     <span class="comment">/*!***********************************************************************</span>
00398 <span class="comment">     @Function      OsGet</span>
00399 <span class="comment">     @Input         prefName    Name of value to get</span>
00400 <span class="comment">     @Modified      pp A pointer set to the value asked for</span>
00401 <span class="comment">     @Returns       true on success</span>
00402 <span class="comment">     @Description   Retrieves OS-specific data</span>
00403 <span class="comment">    *************************************************************************/</span>
00404     <span class="keywordtype">bool</span>        <a class="code" href="classPVRShellInit.html#a27">OsGet</a>(<span class="keyword">const</span> prefNamePtrEnum prefName, <span class="keywordtype">void</span> **pp);
00405 
00406     <span class="comment">/*!***********************************************************************</span>
00407 <span class="comment">    @Function       OsSet</span>
00408 <span class="comment">    @Input          prefName    Name of value to set</span>
00409 <span class="comment">    @Input          i32Value    The value to set our named value to</span>
00410 <span class="comment">    @Returns        true on success</span>
00411 <span class="comment">    @Description    Sets OS-specific data</span>
00412 <span class="comment">    *************************************************************************/</span>
00413     <span class="keywordtype">bool</span>        <a class="code" href="classPVRShellInit.html#a29">OsSet</a>(<span class="keyword">const</span> prefNameIntEnum prefName, <span class="keyword">const</span> <span class="keywordtype">int</span> i32Value);
00414 
00415     <span class="comment">/*!***********************************************************************</span>
00416 <span class="comment">     @Function      OsDisplayDebugString</span>
00417 <span class="comment">     @Input         str The debug string to display</span>
00418 <span class="comment">     @Description   Prints a debug string</span>
00419 <span class="comment">    *************************************************************************/</span>
00420     <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a30">OsDisplayDebugString</a>(<span class="keywordtype">char</span> <span class="keyword">const</span> * <span class="keyword">const</span> str);
00421 
00422     <span class="comment">/*!***********************************************************************</span>
00423 <span class="comment">     @Function      OsGetTime</span>
00424 <span class="comment">     @Description   Gets the time in milliseconds</span>
00425 <span class="comment">    *************************************************************************/</span>
00426     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classPVRShellInit.html#a31">OsGetTime</a>();
00427 
00428     <span class="comment">/*</span>
00429 <span class="comment">        API functionality</span>
00430 <span class="comment">    */</span>
00431     <span class="comment">/*!***********************************************************************</span>
00432 <span class="comment">     @Function      ApiInitAPI</span>
00433 <span class="comment">     @description   Initialisation for API-specific code.</span>
00434 <span class="comment">    *************************************************************************/</span>
00435     <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a32">ApiInitAPI</a>();
00436 
00437     <span class="comment">/*!***********************************************************************</span>
00438 <span class="comment">     @Function      ApiReleaseAPI</span>
00439 <span class="comment">     @description   Releases all resources allocated by the API.</span>
00440 <span class="comment">    *************************************************************************/</span>
00441     <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a33">ApiReleaseAPI</a>();
00442 
00443     <span class="comment">/*!***********************************************************************</span>
00444 <span class="comment">     @Function      ApiScreenCaptureBuffer</span>
00445 <span class="comment">     @Input         Width Width of the region to capture</span>
00446 <span class="comment">     @Input         Height Height of the region to capture</span>
00447 <span class="comment">     @Modified      pBuf A buffer to put the screen capture into</span>
00448 <span class="comment">     @description   API-specific function to store the current content of the</span>
00449 <span class="comment">                    FrameBuffer into the memory allocated by the user.</span>
00450 <span class="comment">    *************************************************************************/</span>
00451     <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a34">ApiScreenCaptureBuffer</a>(<span class="keywordtype">int</span> Width,<span class="keywordtype">int</span> Height,<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *pBuf);
00452 
00453     <span class="comment">/*!***********************************************************************</span>
00454 <span class="comment">     @Function      ApiRenderComplete</span>
00455 <span class="comment">     @description   Perform API operations required after a frame has finished (e.g., flipping).</span>
00456 <span class="comment">    *************************************************************************/</span>
00457     <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a35">ApiRenderComplete</a>();
00458 
00459     <span class="comment">/*!***********************************************************************</span>
00460 <span class="comment">    @Function       ApiSet</span>
00461 <span class="comment">    @Input          prefName    Name of value to set</span>
00462 <span class="comment">    @Modified       i32Value    Value to set it to</span>
00463 <span class="comment">    @description    Set parameters which are specific to the API.</span>
00464 <span class="comment">    *************************************************************************/</span>
00465     <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a36">ApiSet</a>(<span class="keyword">const</span> prefNameIntEnum prefName, <span class="keyword">const</span> <span class="keywordtype">int</span> i32Value);
00466 
00467     <span class="comment">/*!***********************************************************************</span>
00468 <span class="comment">     @Function      ApiGet</span>
00469 <span class="comment">     @Input         prefName    Name of value to get</span>
00470 <span class="comment">     @Modified      pn A pointer set to the value asked for</span>
00471 <span class="comment">     @description   Get parameters which are specific to the API.</span>
00472 <span class="comment">    *************************************************************************/</span>
00473     <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a37">ApiGet</a>(<span class="keyword">const</span> prefNameIntEnum prefName, <span class="keywordtype">int</span> *pn);
00474 
00475     <span class="comment">/*!***********************************************************************</span>
00476 <span class="comment">     @Function      ApiGet</span>
00477 <span class="comment">     @Input         prefName    Name of value to get</span>
00478 <span class="comment">     @Modified      pp A pointer set to the value asked for</span>
00479 <span class="comment">     @description   Get parameters which are specific to the API.</span>
00480 <span class="comment">    *************************************************************************/</span>
00481     <span class="keywordtype">bool</span> <a class="code" href="classPVRShellInit.html#a37">ApiGet</a>(<span class="keyword">const</span> prefNamePtrEnum prefName, <span class="keywordtype">void</span> **pp);
00482 
00483     <span class="comment">/*!***********************************************************************</span>
00484 <span class="comment">     @Function      ApiActivatePreferences</span>
00485 <span class="comment">     @description   Run specific API code to perform the operations requested in preferences.</span>
00486 <span class="comment">    *************************************************************************/</span>
00487     <span class="keywordtype">void</span> <a class="code" href="classPVRShellInit.html#a39">ApiActivatePreferences</a>();
00488 };
00489 
00490 <span class="preprocessor">#endif </span><span class="comment">/* __PVRSHELLIMPL_H_ */</span>
00491 
00492 <span class="comment">/*****************************************************************************</span>
00493 <span class="comment"> End of file (PVRShellImpl.h)</span>
00494 <span class="comment">*****************************************************************************/</span>
00495 
00496 
</pre></div><br>
<br>
<P align=left><FONT size=2><STRONG><A 
   href="http://www.imgtec.com/powervr/insider/legal/index.asp">Copyright</A> � 
   1999-2008, Imagination Technologies Ltd.</STRONG></FONT></P>
<hr>
<address style="align: left;"><small><FONT color=f0f>
Generated by <a href="http://www.doxygen.org/index.html">DOXYGEN</a> 1.3.6</small></address>
</body>
</html>
